-- flee_arena
-- create by cheny3
-- 逃离角斗台

return {
    -- 判断
    canTrigger = function(args)
        -- 当前在角斗台里
        if ArenaM.isInArena() then
            return true;
        end

        return false;
    end,

    -- 触发
    trigger = function(args)
        local changeRange = args["chance"];
        if changeRange and math.random(changeRange[2]) < changeRange[1] then
            -- 逃离
            DungeonActionM.go("flee_arena");
            return true;
        end

        return false;
    end,
};
